part of styles;

extension Colour on Color {
  ///---------------------------颜色色值-----------------------------///
  /// 主题颜色色值
  static const int _primaryColorValue = 0xFF0F6EFF; // 主题颜色
  static const int _primaryLightColorValue = 0xFFFFFFFF; //对比色
  static const int _iosTintColor = 0xFF6C9BFF;

  /// 字体颜色色值
  static const int _mainTextColor = 0xFF222222;
  static const int _lightTextColor = 0xFF999999;
  static const int _warningTextColor = 0xFFFA3F3F;
  static const int _errorTextColor = 0xFFFA3F3F;
  static const int _noticeColor = 0xFF8BC4EA;
  static const int _hintTextColor = 0xFFCCCCCC; // 输入框占位文字颜色
  static const int _labelTextColor = 0xFF999999;
  static const int _otherTextColor = 0xFF666666;
  static const int _orangeTextColor = 0xFFFF5722;

  /// 边框（线条）颜色色值
  static const int _dividerColor = 0xFFEEEEEE;
  static const int _lightBorderLineColor = 0xFF31363C;
  static const int _lightButtonBorderColor = 0xFFE0E2E4;

  /// 背景颜色色值
  static const int _backgroundColor = 0xFFF6F7FB;
  static const int _bottomBarColor = 0xFFFFFFFF; // 底部导航栏背景颜色
  static const int _chartBackgroundColor = 0xF1F1F1F1; // 环形图表无数据背景色

  /// 阴影
  static const int _shadowColorValue = 0x1A808080;

  ///----------------------------颜色-------------------------------///

  ///----------------系统纯色----------------///
  static const Color black = Colors.black;
  static const Color white = Colors.white;
  static const Color green = Color(0xFF00AE66);
  static const Color orange = Color(0xFFFAC958);

  ///----------------App 自定义颜色----------------///
  static const Color primaryColor = Color(_primaryColorValue);
  static const Color primaryLightColor = Color(_primaryLightColorValue);
  static const Color iosTintColor = Color(_iosTintColor);
  static const Color labelTextColor = Color(_labelTextColor);
  static const Color bottomTabBarColor = Color(0xFFC5CCD6);
  /// 主要字体颜色
  static const Color mainTextColor = Color(_mainTextColor);
  static const Color black2dTextColor = Color(0xFF2D2D2D);
  static const Color grayE6TextColor = Color(0xFFE6E6E6);
  static const Color inverseMainTextColor = Colour.black;
  static const Color lightTextColor = Color(_lightTextColor);
  static const Color warningTextColor = Color(_warningTextColor);
  static const Color noticeTextColor = Color(_noticeColor);
  static const Color errorTextColor = Color(_errorTextColor);
  static const Color hintTextColor = Color(_hintTextColor);
  static const Color orangeTextColor = Color(_orangeTextColor);
  static const Color otherTextColor = Color(_otherTextColor);
  static const Color offlineTextColor = Color(0xFFCCCCCC);
  static const Color borderColor = Color(0xFFEEEEEE);

  /// 背景颜色
  static const Color backgroundColor = Color(_backgroundColor);
  static const Color diabledButtoBgColor = Color(0xFFCCCCCC);
  static const Color bottomBarColor = Color(_bottomBarColor);
  static const Color chartBackgroundColor = Color(_chartBackgroundColor);
  static const Color backgroundF5F5F7Color = Color(0xFFF5F5F7);

  /// 边框（线条）颜色色值
  static const Color dividerColor = Color(_dividerColor);
  static const Color lightBorderLineColor = Color(_lightBorderLineColor);
  static const Color lightButtonBorderColor = Color(_lightButtonBorderColor);

  ///阴影
  static const Color shadowColor = Color(_shadowColorValue);

  /// 图标颜色
  static const Color iconColor = Colors.white;

  /// 灰色E7
  static const Color grayE7Color = Color(0xFFE7E7E7);

  /// #747474
  static const Color gray74Color = Color(0xFF747474);
  /// #1A1A1A
  static const Color black1AColor = Color(0xFF1A1A1A);
  /// primary swatch color
  static const MaterialColor primarySwatchColor = MaterialColor(
    _primaryColorValue,
    <int, Color>{
      50: Color(0xFFD1E3F6),
      100: Color(0xFFA7C9ED),
      200: Color(0xFF7EB0E4),
      300: Color(0xFF5999DB),
      400: Color(0xFF3683D2),
      500: Color(_primaryColorValue),
      600: Color(0xFF1258A1),
      700: Color(0xFF0d4279),
      800: Color(0xFF092C50),
      900: Color(0xFF041628),
    },
  );

  static int alphaMask = 0xFF000000;
  static int colorMask = 0x00FFFFFF;

  Color get inverseColor {
    int colorValue = (value & colorMask) << 8;
    int inverseColor = (~(colorValue) >> 8) | alphaMask;
    return Color(inverseColor);
  }
}
